/* Global styles */
:root {
  /* Dracula Theme Colors */
  --background: #282a36;
  --current-line: #44475a;
  --foreground: #f8f8f2;
  --comment: #6272a4;
  --cyan: #8be9fd;
  --green: #50fa7b;
  --orange: #ffb86c;
  --pink: #ff79c6;
  --purple: #bd93f9;
  --red: #ff5555;
  --yellow: #f1fa8c;
  
  /* Custom colors based on Dracula Theme */
  --primary-color: var(--purple);
  --success-color: var(--green);
  --warning-color: var(--orange);
  --danger-color: var(--red);
  --dark-bg: var(--background);
  --darker-bg: #191a21;
  --light-text: var(--foreground);
  --gray-text: var(--comment);
  --border-color: var(--current-line);
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--darker-bg);
  color: var(--light-text);
  height: 100vh;
  overflow: hidden; /* Prevent body scroll */
}

/* Prevent unwanted scrollbars */
* {
  box-sizing: border-box;
}

/* Custom scrollbar styling for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--current-line);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-text);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

#root {
  height: 100%;
  width: 100%;
}

.app {
  display: flex;
  height: 100vh;
}

/* Sidebar styles - Podman Desktop inspired */
.sidebar {
  width: 280px;
  background-color: var(--darker-bg);
  border-right: 1px solid var(--border-color);
  height: 100vh;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
  box-sizing: border-box;
  overflow: hidden; /* Prevent sidebar from causing scroll */
}

.sidebar.collapsed {
  width: 60px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--dark-bg);
}

.logo h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
  white-space: nowrap;
  overflow: hidden;
}

.logo-icon {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collapse-btn {
  background: none;
  border: none;
  color: var(--gray-text);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collapse-btn:hover {
  background-color: var(--current-line);
  color: var(--light-text);
}

.nav-menu {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
  max-height: calc(100vh - 200px); /* Account for header and footer */
}

.nav-menu ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  margin: 2px 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--gray-text);
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.nav-link:hover {
  background-color: var(--current-line);
  color: var(--light-text);
}

.nav-link.active {
  background-color: rgba(189, 147, 249, 0.15);
  color: var(--primary-color);
  border-left: 3px solid var(--primary-color);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--primary-color);
}

.nav-icon {
  font-size: 18px;
  margin-right: 12px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.sidebar.collapsed .nav-icon {
  margin-right: 0;
  width: 100%;
}

.nav-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.nav-label {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-description {
  font-size: 12px;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .nav-content {
  display: none;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background-color: var(--dark-bg);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success-color);
  flex-shrink: 0;
}

.status-text {
  font-size: 12px;
  color: var(--gray-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .status-text {
  display: none;
}

/* Main container */
.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100vh; /* Ensure full viewport height */
}

/* Topbar styles */
.topbar {
  height: 60px;
  background-color: var(--dark-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.search-bar input {
  background-color: var(--current-line);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px 12px;
  color: var(--light-text);
  width: 300px;
}

.status-indicators {
  display: flex;
  align-items: center;
  gap: 15px;
}

.connection-status {
  font-size: 24px;
}

.connection-status.connected {
  color: var(--success-color);
}

.user-profile {
  background-color: rgba(189, 147, 249, 0.2);
  padding: 5px 15px;
  border-radius: 15px;
}

/* Content area */
.content {
  flex: 1;
  overflow-y: auto;
  /* Remove padding from content container */
  padding: 0;
  height: calc(100vh - 60px); /* Account for topbar height */
}

/* Page layout */
.page {
  /* Remove fixed height and let content flow naturally */
  min-height: 100%;
  /* Remove overflow from page level */
  overflow: visible;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.page-header h1 {
  margin: 0;
  font-size: 24px;
}

.actions {
  display: flex;
  gap: 10px;
}

button {
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: var(--current-line);
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 14px;
}

button:hover:not(.action-btn):not(.icon-btn) {
  background-color: var(--background);
  border-color: var(--primary-color);
}

button.primary:not(.action-btn) {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--background);
}

button.primary:hover:not(.action-btn) {
  background-color: #a278f0;
  border-color: #a278f0;
}

/* Error message */
.error-message {
  background-color: rgba(255, 85, 85, 0.2);
  border: 1px solid var(--danger-color);
  border-radius: 4px;
  padding: 20px;
  margin: 20px 0;
}

.error-message p {
  margin: 0;
  color: var(--danger-color);
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.tab-button {
  background: none;
  border: none;
  padding: 12px 16px;
  color: var(--gray-text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  position: relative;
  top: 1px;
}

.tab-button:hover {
  color: var(--light-text);
  background-color: rgba(189, 147, 249, 0.05);
}

.tab-button.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background-color: rgba(189, 147, 249, 0.1);
}

.tab-content {
  padding: 0;
  min-height: 200px;
}

/* Large Modal */
.modal-content.large {
  max-width: 900px;
  width: 90vw;
  max-height: 80vh;
}

.modal-content.large .modal-body {
  max-height: calc(80vh - 140px);
  overflow-y: auto;
}

/* Action button for snapshots */
.action-btn.snapshots {
  background-color: transparent;
  border-color: var(--border-color);
}

.action-btn.snapshots:hover {
  border-color: var(--cyan);
  background-color: rgba(139, 233, 253, 0.1);
}

/* Dashboard styles */
.overview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.card {
  background-color: var(--dark-bg);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid var(--border-color);
}

.card h3 {
  margin-top: 0;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.metrics .metric {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.metrics .metric span:first-child {
  width: 80px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background-color: var(--current-line);
  border-radius: 4px;
  margin: 0 10px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 4px;
}

.connection-status .status {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 4px;
  font-weight: bold;
}

.connection-status .status.connected {
  background-color: rgba(80, 250, 123, 0.2);
  color: var(--success-color);
}

.log-summary p {
  color: var(--gray-text);
  margin: 10px 0 0;
}

.vm-stats {
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin-top: 15px;
}

.stat .value {
  display: block;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat .value.running {
  color: var(--success-color);
}

.stat .value.stopped {
  color: var(--danger-color);
}

.stat .label {
  color: var(--gray-text);
  font-size: 14px;
}

.resource-count {
  font-size: 24px;
  text-align: center;
  margin: 20px 0;
  color: var(--primary-color);
}

/* VM List styles */
.vm-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.vm-card {
  background-color: var(--dark-bg);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid var(--border-color);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.vm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.vm-header h3 {
  margin: 0;
  font-size: 18px;
  word-break: break-word;
  flex: 1;
  min-width: 0;
}

.status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
  margin-left: 10px;
}

.status.running {
  background-color: rgba(80, 250, 123, 0.2);
  color: var(--success-color);
}

.status.stopped {
  background-color: rgba(255, 85, 85, 0.2);
  color: var(--danger-color);
}

.status.paused {
  background-color: rgba(255, 184, 108, 0.2);
  color: var(--warning-color);
}

.status.unknown {
  background-color: rgba(98, 114, 164, 0.2);
  color: var(--gray-text);
}

.vm-details {
  margin-bottom: 20px;
  flex: 1;
}

.detail {
  display: flex;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.detail .label {
  width: 80px;
  color: var(--gray-text);
  flex-shrink: 0;
}

.vm-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-section {
  background-color: var(--dark-bg);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  min-width: 0;
}

.settings-section h2 {
  margin-top: 0;
}

/* 响应式设计 - Updated for podman-desktop style */
@media (max-width: 1200px) {
  .vm-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 60px;
  }

  .sidebar-header {
    padding: 12px 8px;
  }

  .logo h2 {
    display: none;
  }

  .logo-icon {
    display: flex !important;
  }

  .collapse-btn {
    display: none;
  }

  .nav-item {
    margin: 2px 4px;
  }

  .nav-link {
    padding: 12px 8px;
    justify-content: center;
  }

  .nav-icon {
    margin-right: 0;
    width: 100%;
  }

  .nav-content {
    display: none;
  }

  .sidebar-footer {
    padding: 12px 8px;
  }

  .status-text {
    display: none;
  }

  .search-bar input {
    width: 150px;
  }

  .vm-list {
    grid-template-columns: 1fr;
  }

  .overview-cards {
    grid-template-columns: 1fr;
  }

  .vm-stats {
    flex-direction: column;
    gap: 15px;
  }

  .activity-item {
    flex-direction: column;
    gap: 5px;
  }

  .activity-item .time {
    width: auto;
  }

  .vm-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .status {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .topbar {
    flex-direction: column;
    height: auto;
    padding: 10px;
    gap: 10px;
  }
  
  .search-bar input {
    width: 100%;
  }
  
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .actions {
    justify-content: center;
  }
  
  .metrics .metric {
    flex-wrap: wrap;
    gap: 5px;
  }
  
  .metrics .metric span:first-child {
    width: auto;
    margin-right: 10px;
  }
  
  .progress-bar {
    width: 100%;
    margin: 5px 0;
  }
  
  .content {
    padding: 10px;
  }
  
  .card {
    padding: 15px;
  }
}

/* Dashboard styles - Podman Desktop inspired */
.dashboard-page {
  padding: 24px;
  /* Remove height and overflow - let parent container handle scrolling */
  min-height: 100%;
  background: linear-gradient(135deg, var(--darker-bg), var(--background));
  position: relative;
}

.dashboard-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(189, 147, 249, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(80, 250, 123, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Metric Charts */
.metric-chart {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}

.chart-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.chart-svg {
  transform: rotate(-90deg);
}

.chart-progress {
  transition: stroke-dashoffset 0.5s ease;
  animation: progressAnimation 1s ease-out;
}

@keyframes progressAnimation {
  from {
    stroke-dashoffset: 283;
  }
}

.chart-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chart-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--light-text);
}

.chart-label {
  font-size: 12px;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metrics-charts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.metrics-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.summary-label {
  font-size: 12px;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--light-text);
}

/* Recent Activity */
.recent-activity {
  max-height: 400px;
  overflow-y: auto;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, var(--current-line), var(--background));
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.activity-item:hover {
  background: linear-gradient(135deg, var(--background), var(--current-line));
  transform: translateX(8px);
  border-color: var(--primary-color);
}

.activity-item.success {
  border-left: 4px solid var(--success-color);
}

.activity-item.error {
  border-left: 4px solid var(--danger-color);
}

.activity-item.info {
  border-left: 4px solid var(--cyan);
}

.activity-icon {
  font-size: 20px;
  width: 32px;
  text-align: center;
  transition: transform 0.3s ease;
}

.activity-item:hover .activity-icon {
  transform: scale(1.2);
}

.activity-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.activity-title {
  font-size: 14px;
  color: var(--light-text);
  font-weight: 600;
}

.activity-time {
  font-size: 11px;
  color: var(--gray-text);
  font-weight: 500;
}

.activity-status {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.activity-status.success {
  color: var(--success-color);
}

.activity-status.error {
  color: var(--danger-color);
}

.activity-status.info {
  color: var(--cyan);
}

.empty-activity {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--gray-text);
  text-align: center;
  background: linear-gradient(135deg, var(--current-line), var(--background));
  border-radius: 12px;
  border: 1px dashed var(--border-color);
  transition: all 0.3s ease;
}

.empty-activity:hover {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, var(--background), var(--current-line));
}

.empty-activity .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.7;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.empty-activity:hover .empty-icon {
  transform: scale(1.1);
}

.empty-activity p {
  margin: 0;
  font-size: 14px;
  color: var(--gray-text);
  font-weight: 500;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.header-content h1 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 600;
  color: var(--light-text);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--gray-text);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success-color);
}

.status-dot.connected {
  background-color: var(--success-color);
}

.last-updated {
  font-size: 12px;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.header-actions button {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--current-line);
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.header-actions button:hover:not(:disabled) {
  background-color: var(--background);
  border-color: var(--primary-color);
}

.header-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  max-width: 1400px;
  width: 100%; /* Ensure grid doesn't overflow */
  position: relative;
  z-index: 1;
}

.dashboard-card {
  background: linear-gradient(135deg, var(--dark-bg), var(--current-line));
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 28px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--cyan), var(--primary-color));
  background-size: 200% 100%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.dashboard-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 12px 40px rgba(189, 147, 249, 0.25);
  transform: translateY(-6px) scale(1.01);
}

.dashboard-card.system-overview {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--dark-bg), #1e1f29);
}

.dashboard-card.quick-actions {
  grid-column: span 1;
}

.dashboard-card.system-status {
  grid-column: span 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--light-text);
  position: relative;
}

.card-header h3::after {
  content: '';
  position: absolute;
  bottom: -17px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 1px;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--gray-text);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 16px;
}

.icon-btn:hover {
  background-color: var(--current-line);
  color: var(--light-text);
}

/* System Overview */
.metrics-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-label {
  font-size: 14px;
  color: var(--gray-text);
}

.metric-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--light-text);
}

.progress-bar {
  height: 6px;
  background-color: var(--current-line);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* VM Summary */
.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, var(--current-line), var(--background));
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.stat-card:hover::before {
  width: 8px;
}

.stat-card:hover {
  background: linear-gradient(135deg, var(--background), var(--current-line));
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(189, 147, 249, 0.1);
}

.stat-icon {
  font-size: 28px;
  transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1);
}

.stat-icon.running {
  color: var(--success-color);
}

.stat-icon.stopped {
  color: var(--gray-text);
}

.stat-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--light-text);
  transition: color 0.3s ease;
}

.stat-number.running {
  color: var(--success-color);
}

.stat-number.stopped {
  color: var(--gray-text);
}

.stat-label {
  font-size: 11px;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}

/* VM Distribution */
.vm-distribution {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.distribution-bar {
  display: flex;
  height: 8px;
  background-color: var(--current-line);
  border-radius: 4px;
  overflow: hidden;
}

.distribution-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.distribution-segment.running {
  background-color: var(--success-color);
}

.distribution-segment.stopped {
  background-color: var(--danger-color);
}

.distribution-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-text);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-color.running {
  background-color: var(--success-color);
}

.legend-color.stopped {
  background-color: var(--danger-color);
}

/* Infrastructure Resources */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.resource-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background-color: var(--current-line);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.resource-item:hover {
  background-color: var(--background);
}

.resource-icon {
  font-size: 24px;
}

.resource-content {
  display: flex;
  flex-direction: column;
}

.resource-count {
  font-size: 20px;
  font-weight: 700;
  color: var(--light-text);
}

.resource-label {
  font-size: 12px;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Quick Actions */
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  background: linear-gradient(135deg, var(--current-line), var(--background));
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(189, 147, 249, 0.15), transparent);
  transition: left 0.6s ease;
}

.action-btn:hover::before {
  left: 100%;
}

.action-btn:hover {
  background: linear-gradient(135deg, var(--background), var(--current-line));
  border-color: var(--primary-color);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 32px rgba(189, 147, 249, 0.3);
}

.action-btn.primary {
  background: linear-gradient(135deg, var(--primary-color), #a278f0);
  border-color: var(--primary-color);
  color: var(--background);
  box-shadow: 0 6px 20px rgba(189, 147, 249, 0.4);
}

.action-btn.primary:hover {
  background: linear-gradient(135deg, #a278f0, var(--primary-color));
  border-color: #a278f0;
  box-shadow: 0 12px 40px rgba(189, 147, 249, 0.5);
  transform: translateY(-4px) scale(1.02);
}

.action-btn:active {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 6px 20px rgba(189, 147, 249, 0.3);
}

.action-icon {
  font-size: 28px;
  margin-bottom: 6px;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.action-btn:hover .action-icon {
  transform: scale(1.2) rotate(5deg);
}

.action-btn.primary .action-icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.action-label {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.action-btn:hover .action-label {
  color: var(--primary-color);
  transform: translateY(-1px);
}

.action-btn.primary .action-label {
  color: var(--background);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* System Status */
.status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, var(--current-line), var(--background));
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.status-item:hover {
  background: linear-gradient(135deg, var(--background), var(--current-line));
  transform: translateX(4px);
  border-color: var(--primary-color);
}

.status-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.status-item:hover .status-icon {
  transform: scale(1.2);
}

.status-icon.connected {
  color: var(--success-color);
}

.status-label {
  flex: 1;
  font-size: 14px;
  color: var(--light-text);
  font-weight: 500;
}

.status-value {
  font-size: 12px;
  color: var(--gray-text);
  font-weight: 600;
  background: var(--current-line);
  padding: 4px 8px;
  border-radius: 6px;
}

/* Loading States */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--current-line);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-card {
  background-color: rgba(255, 85, 85, 0.1);
  border: 1px solid var(--danger-color);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.error-card h3 {
  color: var(--danger-color);
  margin: 0 0 12px 0;
  font-size: 18px;
}

.error-card p {
  color: var(--light-text);
  margin: 0 0 20px 0;
  font-size: 14px;
}

/* 增加对刷新按钮的样式 */
.topbar .actions button {
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--current-line), var(--background));
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.topbar .actions button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(189, 147, 249, 0.1), transparent);
  transition: left 0.5s ease;
}

.topbar .actions button:hover::before {
  left: 100%;
}

.topbar .actions button:hover {
  background: linear-gradient(135deg, var(--background), var(--current-line));
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(189, 147, 249, 0.2);
}

/* 确保所有操作按钮样式一致 */
.vm-actions button {
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: var(--current-line);
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.vm-actions button:hover {
  background-color: var(--background);
  border-color: var(--primary-color);
}

/* Virtual Machines Page - Podman Desktop inspired */
.vm-page {
  padding: 24px;
  /* Remove height and overflow - let parent container handle scrolling */
  min-height: 100%;
}

/* Notification System */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  padding: 16px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 500px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: slideInRight 0.3s ease;
}

.notification-success {
  background-color: rgba(80, 250, 123, 0.1);
  border: 1px solid var(--success-color);
  color: var(--success-color);
}

.notification-error {
  background-color: rgba(255, 85, 85, 0.1);
  border: 1px solid var(--danger-color);
  color: var(--danger-color);
}

.notification-info {
  background-color: rgba(139, 233, 253, 0.1);
  border: 1px solid var(--cyan);
  color: var(--cyan);
}

.notification-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.notification-message {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.notification-close {
  background: none;
  border: none;
  color: currentColor;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.notification-close:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Enhanced Header Controls */
.search-group, .sort-group, .filter-group, .bulk-group {
  display: flex;
  align-items: center;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--current-line);
  color: var(--light-text);
  font-size: 14px;
  min-width: 200px;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(189, 147, 249, 0.2);
}

.sort-select, .filter-select, .bulk-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--current-line);
  color: var(--light-text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-select:focus, .filter-select:focus, .bulk-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.bulk-select {
  background-color: rgba(189, 147, 249, 0.1);
  border-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 500;
}

/* Bulk Selection Bar */
.bulk-selection-bar {
  grid-column: 1 / -1;
  background-color: var(--current-line);
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.selection-count {
  font-weight: 600;
  color: var(--primary-color);
}

/* Enhanced VM Card with Selection */
.vm-card {
  position: relative;
  transition: all 0.2s ease;
}

.vm-card.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(189, 147, 249, 0.3);
}

.vm-selection {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
}

.vm-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

/* Enhanced Action Buttons */
.action-btn.restart:hover {
  background-color: rgba(255, 184, 108, 0.2);
  border-color: var(--warning-color);
  color: var(--warning-color);
}

.action-btn.pause:hover {
  background-color: rgba(255, 184, 108, 0.2);
  border-color: var(--warning-color);
  color: var(--warning-color);
}

.action-btn.resume:hover {
  background-color: rgba(80, 250, 123, 0.2);
  border-color: var(--success-color);
  color: var(--success-color);
}

.action-btn.delete:hover {
  background-color: rgba(255, 85, 85, 0.2);
  border-color: var(--danger-color);
  color: var(--danger-color);
}

.header-content h1 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 600;
  color: var(--light-text);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--gray-text);
}

.vm-count {
  font-weight: 600;
}

.running-count {
  color: var(--success-color);
}

.filter-group {
  display: flex;
  align-items: center;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--current-line);
  color: var(--light-text);
  font-size: 14px;
  cursor: pointer;
}

.view-toggle {
  display: flex;
  gap: 4px;
}

.view-btn {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  background-color: var(--current-line);
  color: var(--gray-text);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.view-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--background);
}

.view-btn:hover:not(.active) {
  background-color: var(--background);
  color: var(--light-text);
}

/* VM Container */
.vm-container {
  display: grid;
  gap: 16px;
  width: 100%; /* Ensure container doesn't overflow */
}

.vm-container.grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.vm-container.list {
  grid-template-columns: 1fr;
}

/* VM Card */
.vm-card {
  background-color: var(--dark-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
  position: relative;
}

.vm-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.vm-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.vm-info {
  flex: 1;
  min-width: 0;
}

.vm-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.status-icon {
  font-size: 16px;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.success {
  background-color: rgba(80, 250, 123, 0.2);
  color: var(--success-color);
}

.status-badge.danger {
  background-color: rgba(255, 85, 85, 0.2);
  color: var(--danger-color);
}

.status-badge.warning {
  background-color: rgba(255, 184, 108, 0.2);
  color: var(--warning-color);
}

.status-badge.unknown {
  background-color: rgba(98, 114, 164, 0.2);
  color: var(--gray-text);
}

.vm-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--light-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vm-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--current-line);
  color: var(--gray-text);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.action-btn:hover {
  background-color: var(--background);
  border-color: var(--primary-color);
  color: var(--light-text);
}

.action-btn.start:hover {
  background-color: rgba(80, 250, 123, 0.2);
  border-color: var(--success-color);
  color: var(--success-color);
}

.action-btn.stop:hover {
  background-color: rgba(255, 85, 85, 0.2);
  border-color: var(--danger-color);
  color: var(--danger-color);
}

.action-btn.details:hover {
  background-color: rgba(189, 147, 249, 0.2);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.action-btn.console:hover {
  background-color: rgba(139, 233, 253, 0.2);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* VM Card Body */
.vm-card-body {
  margin-bottom: 16px;
}

.vm-specs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.spec-label {
  font-size: 12px;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-value {
  font-size: 14px;
  color: var(--light-text);
  font-weight: 500;
}

/* VM Card Footer */
.vm-card-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.vm-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-label {
  font-size: 12px;
  color: var(--gray-text);
}

.meta-value {
  font-size: 12px;
  color: var(--light-text);
  font-weight: 500;
}

.meta-value.success {
  color: var(--success-color);
}

.meta-value.danger {
  color: var(--danger-color);
}

.meta-value.warning {
  color: var(--warning-color);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background-color: var(--dark-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  color: var(--light-text);
}

.empty-state p {
  margin: 0 0 20px 0;
  color: var(--gray-text);
  font-size: 14px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: var(--dark-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--light-text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--gray-text);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background-color: var(--current-line);
  color: var(--light-text);
}

.modal-body {
  margin-bottom: 20px;
}

.detail-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 14px;
  color: var(--gray-text);
  font-weight: 500;
}

.detail-value {
  font-size: 14px;
  color: var(--light-text);
  font-weight: 600;
}

.detail-value.success {
  color: var(--success-color);
}

.detail-value.danger {
  color: var(--danger-color);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.modal-footer button {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--current-line);
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.modal-footer button.primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--background);
}

.modal-footer button.danger {
  background-color: var(--danger-color);
  border-color: var(--danger-color);
  color: var(--background);
}

.modal-footer button.warning {
  background-color: var(--warning-color);
  border-color: var(--warning-color);
  color: var(--background);
}

.modal-footer button.success {
  background-color: var(--success-color);
  border-color: var(--success-color);
  color: var(--background);
}

.modal-footer button.secondary {
  background-color: var(--current-line);
  border-color: var(--border-color);
  color: var(--light-text);
}

.modal-footer button:hover {
  opacity: 0.9;
}

/* Settings Page - Podman Desktop inspired */
.settings-page {
  padding: 24px;
  /* Remove height and overflow - let parent container handle scrolling */
  min-height: 100%;
}

.header-description {
  margin: 8px 0 0 0;
  font-size: 14px;
  color: var(--gray-text);
}

.settings-container {
  display: flex;
  gap: 24px;
  max-width: 1200px;
  width: 100%; /* Ensure container doesn't overflow */
}

.settings-sidebar {
  width: 200px;
  background-color: var(--dark-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: fit-content;
  position: sticky;
  top: 24px;
}

.settings-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--gray-text);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 14px;
}

.settings-tab:hover {
  background-color: var(--current-line);
  color: var(--light-text);
}

.settings-tab.active {
  background-color: rgba(189, 147, 249, 0.15);
  color: var(--primary-color);
  border-left: 3px solid var(--primary-color);
}

.tab-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.tab-label {
  font-weight: 500;
}

.settings-content {
  flex: 1;
  background-color: var(--dark-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}

.settings-section h2 {
  margin: 0 0 24px 0;
  font-size: 20px;
  color: var(--light-text);
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-info {
  flex: 1;
  margin-right: 24px;
}

.setting-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 4px;
}

.setting-description {
  font-size: 12px;
  color: var(--gray-text);
  margin: 0;
  line-height: 1.4;
}

.setting-control {
  display: flex;
  align-items: center;
}

.setting-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--current-line);
  color: var(--light-text);
  font-size: 14px;
  cursor: pointer;
  min-width: 120px;
}

.setting-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.setting-input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--current-line);
  color: var(--light-text);
  font-size: 14px;
  min-width: 200px;
}

.setting-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--current-line);
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--light-text);
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

/* About Content */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.about-item:last-child {
  border-bottom: none;
}

.about-label {
  font-size: 14px;
  color: var(--gray-text);
  font-weight: 500;
}

.about-value {
  font-size: 14px;
  color: var(--light-text);
  font-weight: 600;
  text-align: right;
  max-width: 60%;
}

/* Settings Footer */
.settings-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.settings-footer button {
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--current-line);
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.settings-footer button.primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--background);
}

.settings-footer button:hover {
  opacity: 0.9;
}

/* Storage Page - Podman Desktop inspired */
.storage-page {
  padding: 24px;
  /* Remove height and overflow - let parent container handle scrolling */
  min-height: 100%;
  width: 100%; /* Ensure page doesn't overflow */
  box-sizing: border-box;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 8px;
}

.form-input, .form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--current-line);
  color: var(--light-text);
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(189, 147, 249, 0.2);
}

/* Volumes Section */
.volumes-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.volumes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.volumes-header h4 {
  margin: 0;
  font-size: 16px;
  color: var(--light-text);
}

.volumes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.volume-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background-color: var(--current-line);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.volume-item:hover {
  background-color: var(--background);
}

.volume-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.volume-name {
  font-weight: 500;
  color: var(--light-text);
}

.volume-size {
  font-size: 12px;
  color: var(--gray-text);
}

.volume-actions {
  display: flex;
  gap: 8px;
}

/* Small Buttons */
button.small {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 28px;
}

.pool-count {
  font-weight: 600;
}

.total-capacity {
  color: var(--gray-text);
}

.storage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 24px;
  width: 100%; /* Ensure grid doesn't overflow */
}

.storage-card {
  background-color: var(--dark-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s ease;
}

.storage-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.storage-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.storage-info {
  flex: 1;
  min-width: 0;
}

.pool-name {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--light-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pool-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pool-type {
  font-size: 12px;
  color: var(--gray-text);
  background-color: var(--current-line);
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.storage-actions {
  display: flex;
  gap: 8px;
}

.storage-body {
  margin-bottom: 20px;
}

.capacity-info {
  margin-bottom: 20px;
}

.capacity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.capacity-label {
  font-size: 14px;
  color: var(--gray-text);
  font-weight: 500;
}

.capacity-value {
  font-size: 14px;
  color: var(--light-text);
  font-weight: 600;
}

.capacity-bar {
  height: 8px;
  background-color: var(--current-line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.capacity-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.capacity-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.available-space {
  color: var(--gray-text);
}

.usage-percentage {
  color: var(--light-text);
  font-weight: 600;
}

.pool-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.storage-footer {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.storage-footer button {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--current-line);
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.storage-footer button.primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--background);
}

.storage-footer button.secondary {
  background-color: var(--current-line);
  border-color: var(--border-color);
  color: var(--light-text);
}

.storage-footer button:hover {
  opacity: 0.9;
}

/* Networks Page - Podman Desktop inspired */
.networks-page {
  padding: 24px;
  /* Remove height and overflow - let parent container handle scrolling */
  min-height: 100%;
  width: 100%; /* Ensure page doesn't overflow */
  box-sizing: border-box;
}

.network-count {
  font-weight: 600;
}

.active-count {
  color: var(--success-color);
}

.networks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  width: 100%; /* Ensure grid doesn't overflow */
}

.network-card {
  background-color: var(--dark-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s ease;
}

.network-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.network-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.network-info {
  flex: 1;
  min-width: 0;
}

.network-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.network-name {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--light-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.network-actions {
  display: flex;
  gap: 8px;
}

.network-body {
  margin-bottom: 20px;
}

.network-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.network-footer {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.network-footer button {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--current-line);
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.network-footer button.primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--background);
}

.network-footer button.danger {
  background-color: var(--danger-color);
  border-color: var(--danger-color);
  color: var(--background);
}

.network-footer button.secondary {
  background-color: var(--current-line);
  border-color: var(--border-color);
  color: var(--light-text);
}

.network-footer button:hover {
  opacity: 0.9;
}

/* Snapshots Page */
.snapshots-page {
  padding: 24px;
  /* Remove height and overflow - let parent container handle scrolling */
  min-height: 100%;
  width: 100%; /* Ensure page doesn't overflow */
  box-sizing: border-box;
}

/* Tasks & Logs Page */
.tasks-logs-page {
  padding: 24px;
  /* Remove height and overflow - let parent container handle scrolling */
  min-height: 100%;
  width: 100%; /* Ensure page doesn't overflow */
  box-sizing: border-box;
}

.tasks-logs-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1400px;
  width: 100%; /* Ensure container doesn't overflow */
}

.tasks-section, .logs-section {
  background-color: var(--dark-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}

.tasks-section h2, .logs-section h2 {
  margin: 0 0 20px 0;
  font-size: 18px;
  color: var(--light-text);
}

.empty-state.small {
  padding: 40px 20px;
}

.empty-state.small .empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.empty-state.small p {
  font-size: 14px;
}

/* VM Table Styles - Podman Desktop inspired */
.vm-table-container {
  background-color: var(--dark-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.vm-table-header {
  background-color: var(--current-line);
  border-bottom: 2px solid var(--border-color);
}

.vm-table-row {
  display: grid;
  grid-template-columns: 40px 1fr 120px 100px 100px 80px 200px;
  align-items: center;
  min-height: 56px;
  padding: 0 16px;
  gap: 16px;
}

.vm-table-body .vm-table-row {
  border-bottom: 1px solid var(--border-color);
  transition: all 0.2s ease;
  cursor: pointer;
}

.vm-table-body .vm-table-row:hover {
  background-color: var(--current-line);
}

.vm-table-body .vm-table-row.selected {
  background-color: rgba(189, 147, 249, 0.1);
  border-left: 3px solid var(--primary-color);
}

.vm-table-body .vm-table-row:last-child {
  border-bottom: none;
}

.vm-table-cell {
  display: flex;
  align-items: center;
  min-height: 56px;
}

.select-cell {
  justify-content: center;
}

.name-cell.sortable,
.status-cell.sortable,
.cpu-cell.sortable,
.memory-cell.sortable {
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  color: var(--light-text);
  gap: 8px;
}

.name-cell.sortable:hover,
.status-cell.sortable:hover,
.cpu-cell.sortable:hover,
.memory-cell.sortable:hover {
  color: var(--primary-color);
}

.sort-indicator {
  font-size: 12px;
  color: var(--gray-text);
  margin-left: 4px;
}

.vm-name-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vm-name {
  font-weight: 600;
  color: var(--light-text);
  margin: 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.success {
  background-color: var(--success-color);
}

.status-dot.danger {
  background-color: var(--danger-color);
}

.status-dot.warning {
  background-color: var(--warning-color);
}

.status-dot.unknown {
  background-color: var(--gray-text);
}

.status-text {
  font-size: 13px;
  font-weight: 500;
  text-transform: capitalize;
}

.status-text.success {
  color: var(--success-color);
}

.status-text.danger {
  color: var(--danger-color);
}

.status-text.warning {
  color: var(--warning-color);
}

.status-text.unknown {
  color: var(--gray-text);
}

.spec-value {
  font-weight: 500;
  color: var(--light-text);
  font-size: 14px;
}

.autostart-indicator {
  font-size: 13px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.autostart-indicator.enabled {
  background-color: rgba(80, 250, 123, 0.2);
  color: var(--success-color);
}

.autostart-indicator.disabled {
  background-color: rgba(98, 114, 164, 0.2);
  color: var(--gray-text);
}

.table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.table-actions .action-btn {
  width: 28px;
  height: 28px;
  font-size: 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.table-actions .action-btn:hover {
  transform: scale(1.1);
}

/* Responsive table design */
@media (max-width: 1200px) {
  .vm-table-row {
    grid-template-columns: 40px 1fr 120px 80px 80px 70px 180px;
    gap: 12px;
  }
}

@media (max-width: 992px) {
  .vm-table-row {
    grid-template-columns: 40px 1fr 100px 70px 70px 60px 160px;
    gap: 10px;
    padding: 0 12px;
  }

  .vm-table-cell {
    font-size: 13px;
  }

  .vm-name {
    font-size: 13px;
  }

  .table-actions .action-btn {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .vm-table-container {
    border-radius: 8px;
  }

  .vm-table-row {
    grid-template-columns: 36px 1fr 80px 60px;
    gap: 8px;
    padding: 0 10px;
    min-height: 48px;
  }

  .vm-table-cell {
    min-height: 48px;
  }

  /* Hide less important columns on mobile */
  .cpu-cell,
  .memory-cell,
  .autostart-cell {
    display: none;
  }

  .actions-cell {
    grid-column: 4;
  }

  .name-cell {
    grid-column: 2;
  }

  .status-cell {
    grid-column: 3;
  }

  /* Dashboard responsive styles */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dashboard-card {
    padding: 20px;
    border-radius: 12px;
  }

  .dashboard-card.system-overview {
    grid-column: 1;
  }

  .metrics-charts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .action-grid {
    grid-template-columns: 1fr;
  }

  .summary-stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 16px;
  }

  .status-item {
    padding: 12px;
  }

  .activity-item {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .vm-table-row {
    grid-template-columns: 32px 1fr 70px;
    gap: 6px;
    padding: 0 8px;
    min-height: 44px;
  }

  .vm-table-cell {
    min-height: 44px;
  }

  /* Hide actions column on very small screens */
  .actions-cell {
    display: none;
  }

  .vm-name {
    font-size: 12px;
  }

  .status-text {
    font-size: 11px;
  }

  .status-dot {
    width: 6px;
    height: 6px;
  }
}

/* VM Wizard Styles */
.wizard-modal {
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.wizard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.wizard-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--light-text);
}

.wizard-progress {
  margin-bottom: 24px;
}

.progress-bar {
  height: 4px;
  background-color: var(--current-line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.step-indicator {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--current-line);
  color: var(--gray-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  position: relative;
}

.step-indicator.active {
  background-color: var(--primary-color);
  color: var(--background);
}

.step-indicator.completed {
  background-color: var(--success-color);
  color: var(--background);
}

.step-indicator:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  width: 40px;
  height: 2px;
  background-color: var(--current-line);
  transform: translateY(-50%);
  margin-left: 4px;
}

.step-indicator.completed:not(:last-child)::after {
  background-color: var(--success-color);
}

.wizard-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.wizard-step {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wizard-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  margin-top: 24px;
}

.wizard-footer button {
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--current-line);
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.wizard-footer button.primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--background);
}

.wizard-footer button.secondary:hover {
  background-color: var(--background);
  border-color: var(--primary-color);
}

.wizard-footer button.primary:hover {
  opacity: 0.9;
}

.wizard-footer button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Form Styles for Wizard */
.wizard-step .form-group {
  margin-bottom: 20px;
}

.wizard-step .form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 8px;
}

.wizard-step .form-label.required::after {
  content: ' *';
  color: var(--danger-color);
}

.wizard-step .form-input,
.wizard-step .form-select,
.wizard-step .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--current-line);
  color: var(--light-text);
  font-size: 14px;
  transition: all 0.2s ease;
}

.wizard-step .form-input:focus,
.wizard-step .form-select:focus,
.wizard-step .form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(189, 147, 249, 0.2);
}

.wizard-step .form-input.error,
.wizard-step .form-select.error {
  border-color: var(--danger-color);
}

.wizard-step .form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.wizard-step .error-text {
  display: block;
  font-size: 12px;
  color: var(--danger-color);
  margin-top: 4px;
}

.wizard-step .error-message {
  background-color: rgba(255, 85, 85, 0.1);
  border: 1px solid var(--danger-color);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 16px;
  color: var(--danger-color);
  font-size: 14px;
}

/* Input Groups */
.input-with-status {
  position: relative;
  display: flex;
  align-items: center;
}

.input-status {
  position: absolute;
  right: 12px;
  font-size: 16px;
}

.input-status.success {
  color: var(--success-color);
}

.input-status.error {
  color: var(--danger-color);
}

.memory-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.memory-input-group .form-input {
  flex: 1;
}

.memory-input-group .memory-unit {
  width: 80px;
}

.memory-usage-bar {
  margin-top: 8px;
}

.memory-usage-text {
  font-size: 12px;
  color: var(--gray-text);
  margin-bottom: 4px;
}

.memory-usage-progress {
  height: 4px;
  background-color: var(--current-line);
  border-radius: 2px;
  overflow: hidden;
}

.memory-usage-fill {
  height: 100%;
  background-color: var(--success-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.memory-usage-fill.warning {
  background-color: var(--warning-color);
}

.resource-hint {
  font-size: 12px;
  color: var(--gray-text);
  margin-top: 4px;
}

/* Radio Buttons */
.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--light-text);
}

.radio-label input[type="radio"] {
  accent-color: var(--primary-color);
}

.iso-type-selector {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.file-input-group {
  display: flex;
  gap: 8px;
}

.file-input-group .form-input {
  flex: 1;
}

.file-browse-btn {
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--current-line);
  color: var(--light-text);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.file-browse-btn:hover {
  background-color: var(--background);
  border-color: var(--primary-color);
}

/* MAC Address Input */
.mac-input-group {
  display: flex;
  gap: 8px;
}

.mac-input-group .form-input {
  flex: 1;
}

.generate-mac-btn {
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--current-line);
  color: var(--light-text);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.generate-mac-btn:hover {
  background-color: var(--background);
  border-color: var(--primary-color);
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--light-text);
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--primary-color);
}

/* Boot Order */
.boot-order-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.boot-order-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background-color: var(--current-line);
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.boot-order-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.boot-order-device {
  flex: 1;
  font-size: 14px;
  color: var(--light-text);
}

.boot-order-remove {
  background: none;
  border: none;
  color: var(--danger-color);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.boot-order-remove:hover {
  background-color: rgba(255, 85, 85, 0.1);
}

.boot-order-add {
  margin-top: 8px;
}

button.small {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 28px;
}

/* Responsive Wizard */
@media (max-width: 768px) {
  .wizard-modal {
    width: 95%;
    max-height: 90vh;
  }

  .wizard-header h2 {
    font-size: 18px;
  }

  .wizard-footer {
    flex-wrap: wrap;
    gap: 8px;
  }

  .wizard-footer button {
    padding: 8px 16px;
    font-size: 13px;
  }

  .memory-input-group {
    flex-direction: column;
    align-items: stretch;
  }

  .memory-input-group .memory-unit {
    width: 100%;
  }

  .iso-type-selector {
    flex-direction: column;
    gap: 8px;
  }

  .file-input-group,
  .mac-input-group {
    flex-direction: column;
  }

  .boot-order-item {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

/* Responsive Design for All Pages */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .storage-grid, .networks-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .tasks-logs-container {
    grid-template-columns: 1fr;
  }
}

/* Debug styles for scrollbar testing - remove these if not needed */
.debug-scroll {
  border: 2px solid red !important;
}

/* Ensure proper scrolling behavior */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden; /* Prevent app-level scroll */
}

@media (max-width: 768px) {
  .settings-container {
    flex-direction: column;
  }

  .settings-sidebar {
    width: 100%;
    position: static;
  }

  .vm-container.grid {
    grid-template-columns: 1fr;
  }

  .storage-grid, .networks-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .header-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .dashboard-page, .vm-page, .storage-page, .networks-page, .settings-page, .snapshots-page, .tasks-logs-page {
    padding: 16px;
  }

  .dashboard-card, .vm-card, .storage-card, .network-card {
    padding: 16px;
  }

  .settings-content {
    padding: 16px;
  }

  .tasks-logs-container {
    gap: 16px;
  }
}
